//
//  ICMTitleTextFeildView.h
//  ICrEAM
//
//  Created by FoREVer_SaD on 16/10/26.
//  Copyright © 2016年 mac. All rights reserved.
//

#import <UIKit/UIKit.h>

@class ICMTitleTextFeildView;

@protocol ICMTitleTextFeildViewDelegate <NSObject>

@optional
- (void)editableViewDidEndEdit:(ICMTitleTextFeildView *)sender;
- (void)clickedData:(ICMTitleTextFeildView *)titleTextFeildView;
//值变化调用此方法
- (void)iCMTitleTextFeildViewValueChanged;
- (void)textFiledShouldReturnClickWithView:(ICMTitleTextFeildView *)textView;
@end

@interface ICMTitleTextFeildView : UIView

//是否多选
@property (nonatomic, assign) BOOL isMultiSelect;

//
@property (nonatomic, weak) UILabel *titleLabel;

@property (nonatomic, strong) UIButton *contentTextButton;

@property (nonatomic, weak) UITextField *contentTextFeild;

@property (nonatomic, copy) NSString *title;

@property (nonatomic, copy) NSString *contentText;

@property (nonatomic, strong) UIView *borderView;

//所选择的index
@property (nonatomic, assign) NSInteger selectIndex;
//no 列表
@property (nonatomic, strong) NSMutableArray *clickDataNoArray;
//所选择的no
@property (nonatomic, copy) NSString *noStr;

@property (nonatomic, strong) NSMutableArray *clickDataArray;

@property (nonatomic, assign) BOOL isUppercase;
@property (nonatomic, assign) BOOL btnEnAble;
@property (nonatomic, copy) NSString *signStr;
@property (nonatomic, assign) NSInteger limitedNum;
@property (nonatomic, strong) UILabel *mileageLabel;
@property (nonatomic, weak) id<ICMTitleTextFeildViewDelegate> delegate;

- (instancetype)initEditableViewWithFrame:(CGRect)frame title:(NSString *)title;

- (instancetype)initNoneditableViewWithFrame:(CGRect)frame title:(NSString *)title;

- (instancetype)initNoneditableViewRedWithFrame:(CGRect)frame title:(NSString *)title;

- (instancetype)initClickableViewWithFrame:(CGRect)frame title:(NSString *)title addTarget:(id)target selector:(SEL)selector;

+ (instancetype)createEditableICMTitleTextFeildViewWithFrame:(CGRect)frame title:(NSString *)title;

+ (instancetype)createNoneditableICMTitleTextFeildViewWithFrame:(CGRect)frame title:(NSString *)title;

+ (instancetype)createClickableICMTitleTextFeildViewWithFrame:(CGRect)frame title:(NSString *)title addTarget:(id)target selector:(SEL)selector;

+ (instancetype)createNoneditableICMTitleTextFeildViewRedWithFrame:(CGRect)frame title:(NSString *)title;
@end
